
#	基础镜像
FROM  nginx/redis:1

#	复制文件
COPY ./jshERP3.5-最新包/后端包/jshERP /app/jsherp/boot/
COPY ./jshERP3.5-最新包/前端包/dist /app/jsherp/web/
COPY ./application.properties /app/jsherp/boot/config/
COPY ./tomcat /opt/tomcat/
COPY ./nginx.conf /etc/nginx/
COPY ./redis.conf /etc/
COPY ./start.sh /


# Install cURL
RUN echo -e "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/main\n\
https://mirror.tuna.tsinghua.edu.cn/alpine/v3.4/community" > /etc/apk/repositories

#安装jdk
RUN apk --update add curl bash openjdk8-jre && \
	rm -rf /var/cache/apk/* && \
	mkdir -p /opt && \
	apk add fontconfig && \
	apk add --update ttf-dejavu && \
	fc-cache --force && \
	chmod -R 755 /app/jsherp
	


# Set environment
ENV JAVA_HOME /usr/lib/jvm/default-jvm
ENV PATH ${PATH}:${JAVA_HOME}/bin
ENV TOMCAT_HOME /opt/tomcat
ENV PATH ${PATH}:${TOMCAT_HOME}/bin
ENV mysqlip=localhost mysqlname=jsh_erp mysqlusername=jsherp mysqlpassword=123456
ENV redisip=127.0.0.1 redisport=6379 redispassword=1234abcd


#	配置参数
ENV TZ=Asia/Shanghai
VOLUME ["/etc/nginx/logs"]


#	暴露端口
#EXPOSE 80
EXPOSE 3000
#EXPOSE 6379
#EXPOSE 8080
EXPOSE 9999




ENTRYPOINT [ "/bin/sh","/start.sh" ] 
